package com.ayjsolutions.marcadoresfutbol;

import java.util.ArrayList;

import android.content.Context;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.ArrayAdapter;
import android.widget.ImageButton;
import android.widget.ListView;

import com.actionbarsherlock.app.SherlockActivity;
import com.actionbarsherlock.view.ActionProvider;

public class Partido extends SherlockActivity {
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);

		setContentView(R.layout.resumen_partido);
		
		ArrayList<String> listItems=new ArrayList<String>();
		listItems.add("gol uno");
		listItems.add("gol dos");
		
		ListView lv = (ListView) findViewById(R.id.listView1);
		ArrayAdapter adapter = new ArrayAdapter<String>(this,
	            android.R.layout.simple_list_item_1,
	            listItems);
		lv.setAdapter(adapter);

	}

	public static class Refresh extends ActionProvider {

		/** Context for accessing resources. */
		private final Context mContext;

		/**
		 * Creates a new instance.
		 * 
		 * @param context
		 *            Context for accessing resources.
		 */
		public Refresh(Context context) {
			super(context);
			mContext = context;
		}

		/**
		 * {@inheritDoc}
		 */
		@Override
		public View onCreateActionView() {
			// Inflate the action view to be shown on the action bar.
			LayoutInflater layoutInflater = LayoutInflater.from(mContext);
			View view = layoutInflater.inflate(R.layout.layout_refresh, null);
			ImageButton button = (ImageButton) view.findViewById(R.id.button);
			// Attach a click listener for launching the system settings.
			button.setOnClickListener(new View.OnClickListener() {
				@Override
				public void onClick(View v) {

					// Utiles.refreshPartidos((MainActivity) activity, 0);

				}
			});
			return view;
		}

	}

}
